# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=libdbi-drivers
pkgver=0.9.0
pkgrel=3
pkgdesc="Database-specific drivers for the libdbi framework"
url="https://libdbi-drivers.sourceforge.net/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="libdbi-dev freetds-dev mysql-dev libpq-dev sqlite-dev"
source="https://downloads.sourceforge.net/libdbi-drivers/libdbi-drivers/libdbi-drivers-$pkgver/libdbi-drivers-$pkgver.tar.gz
	gcc14.patch
	"
options="libtool !check"

prepare() {
	default_prepare

	update_config_guess
	update_config_sub
}

build() {
	CFLAGS="$CFLAGS -Wno-error=int-conversion" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/usr \
		--with-mysql \
		--with-pgsql \
		--with-sqlite3 \
		--disable-docs
	make
}

package() {
	make DESTDIR="$pkgdir" install
	chmod -R o-w "$pkgdir"/usr/lib/libdbi
}

sha512sums="
f4d3aaa71014697c53012a10bf9f0af398bcf5ee5872af165f8f43a682d2fb3045a9172ffea0e068dcbfcad52494878c037d8d90fadfaf176936e42f7f1e85c1  libdbi-drivers-0.9.0.tar.gz
c650177352cdbffa90fd0e2a47466f4b5df2fbc3418bd8b4d45e62e4dababa45ba3f2c703e5ac3e4c957f19dbfa91ffa0e39ee5615d3dc0aec8b0018948525a3  gcc14.patch
"
